﻿
Partial Class DueReport
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim sb As New System.Text.StringBuilder
        For Each item As WebControls.ListItem In ListBox1.Items
            If item.Selected Then
                sb.Append(item.Value)
                sb.Append(",")
            End If
        Next
        Dim moires As String = sb.ToString
        If moires.Length > 0 Then
            moires = Left(moires, moires.Length - 1)
            sqldsDueReport.FilterExpression = "id_Moira in (" + moires + ")"
        Else
            sqldsDueReport.FilterExpression = "--"
        End If

    End Sub

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Pithiki" Then
            Dim gv As GridView = e.CommandSource
            Dim r As GridViewRow = gv.Rows(e.CommandArgument)
            Response.Redirect("Executed.aspx?id=" & r.Cells(1).Text)
            'Response.Write("Executed.aspx?id=" & r.Cells(1).Text)
            Response.End()
        End If
    End Sub
End Class
